package com.jackiechancinema.ssm.controller;

import com.jackiechancinema.ssm.entity.FilmPerf;
import com.jackiechancinema.ssm.service.Inte.FilmPerfService;
import com.jackiechancinema.ssm.vo.PageVo;
import com.jackiechancinema.ssm.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController //等价于 @Controller+@ResponseBody
public class FilmPerfController {
    @Autowired
    private FilmPerfService filmPerfService;
    @RequestMapping("/page/filmPerf/filmpreflook")
    public PageVo<FilmPerf> queryAll(int page, int limit){
        return filmPerfService.queryAll(page,limit);
    }
    @RequestMapping("/page/filmPerf/filmprefsave")
    public R save(FilmPerf filmPerf){
        return filmPerfService.insert(filmPerf);
    }
//    @RequestMapping("/page/Perf/prefdelete")
//    public R save(int perf_id){
//        return perfService.delete(perf_id);
//    }
    //编辑用户信息
    @RequestMapping("/page/filmPerf/filmperfedit")
    public R update(FilmPerf filmPerf){
        return filmPerfService.updete(filmPerf);
    }
    //删除用户信息
    @RequestMapping("/page/filmPerf/filmprefdelete")
    public R delete(int filmperf_id){
        return filmPerfService.delete(filmperf_id);
    }

}
